package com.example.rabbitmq.rabbitmq;


import com.example.rabbitmq.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


/**
 * @author shawn
 * @since 2021/4/21 16:06
 */
@Component
@Slf4j
public class ConfirmReceiveListener {
    @RabbitListener(queues = "queue_confirm")
    public void receiveMsg(User user) {
        log.info("接收到的消息为：{}", user);
    }
}
